<?php
// *** Tangra (Application Framework and Tools for PHP)
// $Id$
//


require_once($PATHS->get_hidden().'inc/modules/tple_smarty/tple_smarty_config_loader_file.class.php');

$tple_smarty_config_loader = create_tple_smarty_config_loader();


require_once_php4_lib($tple_smarty_config_loader->get_smarty_lib_path().'libs/Smarty.class.php');


require_once($PATHS->get_hidden().'inc/modules/tple_smarty/tple.class.php');


$smarty_config['tpl_dir'] = $tple_smarty_config_loader->get_tpl_dir();
$smarty_config['compile_dir'] = $tple_smarty_config_loader->get_compile_dir();
$smarty_config['cache_dir'] = $tple_smarty_config_loader->get_cache_dir();
$smarty_config['caching'] = $tple_smarty_config_loader->get_caching();
$smarty_config['additional_plugins_directories'] = $tple_smarty_config_loader->get_additional_plugins_directories();
//
//$WSC->set_module_config('my_tple', $smarty_config);


function create_tple_smarty_config_loader() {
	global $tple_smarty_config_loader;
	global $PATHS;

	$tple_smarty_config_loader = new TPLE_Smarty_Config_Loader_File($PATHS->get_hidden().'conf/'.TANGRA_MACHINE_SPECIFIC_CONF_FILENAME);

	return $tple_smarty_config_loader;
}

